package com.cyh.testdesignpattern.adapter.objectadapter;

//220V电压转5V电压
public class ObjectVoltageAdapter implements IObjectVoltage5V {
    private ObjectVoltage220V voltage220V;

    public ObjectVoltageAdapter(ObjectVoltage220V voltage220V) {
        this.voltage220V = voltage220V;
    }

    @Override
    public int output5V() {
        int srcV = voltage220V.output220V();
        int dstV = srcV/44;
        return dstV;
    }
}
